﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
     Inherits="SouthernLand.Articles.Search" CodeBehind="Search.aspx.cs" %>

<%@ Register TagPrefix="southern" Namespace="SouthernLand.Common" Assembly="SouthernLand" %>
<%@ Register Src="~/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Register TagPrefix="southern" Namespace="SouthernLand.Common.Untilities" Assembly="SouthernLand" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server">
    <uc:Title Visible="false" runat="server" ID="Title1" />
    <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td align="left" style="font-size: 13px; font-weight: bold">
                <asp:Label runat="server" ID="lblKetqua"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" style="padding-top: 5px;">
                <asp:Panel runat="server" ID="PanelMsg" CssClass="lblMsg" Visible="false">
                    &nbsp;&nbsp;&nbsp;<asp:Label runat="server" ID="lblMsg" Font-Bold="true"></asp:Label>&nbsp;&nbsp;&nbsp;
                </asp:Panel>
            </td>
        </tr>
    </table>
    <br />
    <br />
    <asp:UpdatePanel ID="ArticlesSearch" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <table width="98%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="top" style="padding-right: 5px;">
                        <asp:Repeater ID="rptArticles" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td valign="top" align="left">
                                        <div style="padding-bottom: 3pt;">
                                            <a class="NewsTitle" href="<%=ApplicationPath%>Articles/ArticleDetail.aspx?ArticleID=<%# Eval("ArticleID")%>">
                                                <%# Eval("Title").ToString().ToLower().Replace(Globals.GetStringFromQueryString("kq").ToLower(), "<span class=Keyword>" + Globals.GetStringFromQueryString("kq").ToLower() + "</span>")%>
                                            </a><span class="NewsTime">(<%# Formatter.FormatDateTime((DateTime)Eval("PostDate"))%>)</span>
                                        </div>
                                        <table class="<%#Globals.CheckImage(Convert.ToString(Eval("ImageURL"))) %>" cellspacing="5"
                                            cellpadding="0" align="left" border="0">
                                            <tbody>
                                                <tr>
                                                    <td class="BorderImage">
                                                        <southern:ImageObject Width="130" ImageFilter='off' BorderStyle="solid" ID="img1"
                                                            runat="server" ImagePath='<%# Globals.ApplicationPath  + "UserUpload/Articles/" %>'
                                                            ImageName='<%# Eval("ImageURL") %>' />
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <div style="text-align: justify; line-height: 18px;">
                                            <%#Eval("Excerpt") %>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="padding-right: 3pt; padding-bottom: 5px;">
                                        <img src="<%=Globals.ImagesUrl()%>arrow.gif" />
                                        <a class="ReadMore" href="<%=ApplicationPath%>Articles/ArticleDetail.aspx?ArticleID=<%# Eval("ArticleID")%>">
                                            <%=ResourceManager.GetString("ReadMore") %></a>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="background-repeat: repeat-x; padding: 3pt;" background="<%=Globals.ImagesUrl()%>pm_line.gif">
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
                <tr>
                    <td align="center" style="padding-top: 25px; padding-bottom: 25px;">
                        <div align="center">
                            <asp:Panel ID="DisplayPager" Visible="True" runat="server">
                                <div align="center">
                                    <table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
                                        <tr>
                                            <td valign="middle" align="center">
                                                <southern:Pager ID="Pager" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="middle" align="center">
                                                <southern:CurrentPage ID="CurrentPage" runat="server" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
